Golang - 條件式與迴圈



if-else

if condition {
    ...
} else {
    ...
}

switch

switch condition {
case c1:
    ...
case c2:
    ...
default:
    ...
}

for

for i := 0; i < count; i++ {
    ...
}

while

for {
    ...
}
#golang #GO







你可能感興趣的文章

JS 解構 (Destructuring)

JS 解構 (Destructuring)

Twitch API壞掉惹,害我debug 超久QQ

Twitch API壞掉惹,害我debug 超久QQ

MTR04_0828

MTR04_0828






留言討論